package com.vy.stl.service.impl;

import com.vy.stl.mapper.ChartsMapper;
import com.vy.stl.service.ChartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @create: 2025/09/05 08:49
 * @description:
 */
@Service
public class ChartsServiceImpl implements ChartsService {

    @Autowired
    private ChartsMapper chartsMapper;

    @Override
    public Map<String, Object> getMemberTotal() {
        return chartsMapper.selectMemberTotal();
    }

    @Override
    public Map<String, Object> getCoachTotal() {
        return chartsMapper.selectCoachTotal();
    }

    @Override
    public Map<String, Object> getCourseTotal() {
        return chartsMapper.selectCourseTotal();
    }

    @Override
    public Map<String, Object> getReserveTotal() {
        return chartsMapper.selectReserveTotal();
    }

    @Override
    public List<Map<String, Object>> getWeekMember(Date date) {
        return chartsMapper.selectWeekMember(date);
    }

    @Override
    public List<Map<String, Object>> getWeekCourse(Date date) {
        return chartsMapper.selectWeekCourse(date);
    }

    @Override
    public List<Map<String, Object>> getWeekReserve(Date date) {
        return chartsMapper.selectWeekReserve(date);
    }

    @Override
    public List<Map<String, Object>> getWeekCoach(Date date) {
        System.out.println("date:"+date);
        return chartsMapper.getWeekCoach(date);
    }

    @Override
    public List<Map<String, Object>> getHotCourse(Date date) {
        return chartsMapper.selectCourseOrderByReserve(date);
    }

    @Override
    public List<Map<String, Object>> getHotCoach(Date date) {
        return chartsMapper.selectCoachOrderByReserve(date);
    }
}
